<-----Attribute Table--------->

CREATE TABLE `attributes` ( `id` bigint(20) UNSIGNED NOT NULL, `attribute_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL )


<-------Iteams table --------->

 CREATE TABLE `iteams` ( `id` bigint(20) UNSIGNED NOT NULL, `product_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `visible` tinyint(1) NOT NULL DEFAULT 1, `created_at` timestamp NOT NULL DEFAULT current_timestamp(), `updated_at` timestamp NOT NULL DEFAULT current_timestamp(), `deleted_at` timestamp NULL DEFAULT NULL )


<-------Iteams_attributes------>

 CREATE TABLE `iteams_attributes` ( `id` bigint(20) UNSIGNED NOT NULL, `product_id` int(11) NOT NULL, `attribute_id` int(11) NOT NULL, `attribute_value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `is_active` tinyint(1) DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), `updated_at` timestamp NOT NULL DEFAULT current_timestamp() )


<-------Relations table-------->


 CREATE TABLE `relations` ( `id` bigint(20) UNSIGNED NOT NULL, `product_id` int(11) NOT NULL, `relation_id` int(11) NOT NULL, `created_at` timestamp NOT NULL DEFAULT current_timestamp(), `updated_at` timestamp NOT NULL DEFAULT current_timestamp() )




home product(dropdown) CUSTMIZE STUDIO document videos 


ALTER TABLE `attributes` CHANGE `non_deletable` `non_deletable` TINYINT(1) NOT NULL;




<------------p_i table----->

 CREATE TABLE `p_i_s` ( `id` bigint(20) UNSIGNED NOT NULL, `pi_no` int(11) NOT NULL, `quotation_id` int(11) NOT NULL, `created_at` timestamp NULL DEFAULT current_timestamp(), `updated_at` timestamp NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


<------------quotation table----->

CREATE TABLE `quotations` ( `id` bigint(20) UNSIGNED NOT NULL, `quotation_no` int(11) NOT NULL, `company_id` int(20) NOT NULL, `conformation` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `issue_date` date NOT NULL, `billing_id` int(11) NOT NULL, `shipping_id` int(11) NOT NULL, `note` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

<------------quotation_products table----->

 CREATE TABLE `quotation_products` ( `id` bigint(20) UNSIGNED NOT NULL, `quotation_no` int(11) NOT NULL, `item_id` int(11) NOT NULL, `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `unit_cost` int(11) NOT NULL, `quantity` int(11) NOT NULL, `c_s_gst` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, `i_gst` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT current_timestamp(), `updated_at` timestamp NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



<------------notifications table----->

CREATE TABLE `notifications` ( `id` bigint(20) UNSIGNED NOT NULL, `sender_id` int(11) NOT NULL, `receiver_id` int(11) NOT NULL, `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `read/unread` tinyint(1) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



<------company_address------>

ALTER TABLE `company_addresses` ADD `pincode` BIGINT(20) NOT NULL AFTER `country`, ADD `mobile` BIGINT(20) NOT NULL AFTER `pincode`;

ALTER TABLE `company_addresses` DROP `street`;

ALTER TABLE `company_addresses` ADD `address_line1` VARCHAR(100) NOT NULL AFTER `type`, ADD `address_line2` VARCHAR(100) NOT NULL AFTER `address_line1`, ADD `address_line3` VARCHAR(100) NOT NULL AFTER `address_line2`;

ALTER TABLE `company_addresses` ADD `District` VARCHAR(50) NOT NULL AFTER `city`;

ALTER TABLE `company_addresses` DROP `district`;

ALTER TABLE `company_addresses` ADD `alias_name` VARCHAR(255) NOT NULL AFTER `type`;

ALTER TABLE `company_addresses` CHANGE `id` `address_id` INT(11) NOT NULL AUTO_INCREMENT;

ALTER TABLE `company_addresses` ADD `alternate_mobileno` INT(20) NOT NULL AFTER `mobile`;

ALTER TABLE `company_addresses` ADD `person_name` VARCHAR(50) NOT NULL AFTER `alias_name`;

ALTER TABLE `company_addresses` CHANGE `alternate_mobileno` `alternate_mobileno` BIGINT(20) NOT NULL;


<------company------>

ALTER TABLE `companies` ADD `alternate_email` VARCHAR(50) NOT NULL DEFAULT '' AFTER `email`;

ALTER TABLE `companies` CHANGE `alternate_email` `alternate_email` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'null';

ALTER TABLE `companies` ADD `company_code` VARCHAR(255) NOT NULL DEFAULT 'null' AFTER `id`;







